<?php
$v_user_id = 0;
if(isset($_REQUEST['hdn_user_id'])){
	$v_user_id = $_REQUEST['hdn_user_id'];
}
$v_user_name = $_REQUEST['txt_name'];
$v_user_username = $_REQUEST['txt_username'];
$v_user_password = $_REQUEST['txt_password'];
$v_user_address = $_REQUEST['txt_address'];
$v_user_tel = $_REQUEST['txt_tel'];
$v_user_email = $_REQUEST['txt_email'];
if(_is_sqlserver()){
	$cmd = mssql_init("USER_UserUpdate",$conn);
	@mssql_bind($cmd,"@p_user_id",$v_user_id,SQLINT4);
	@mssql_bind($cmd,"@p_name",$v_user_name,SQLVARCHAR);
	@mssql_bind($cmd,"@p_address",$v_user_address,SQLVARCHAR);
	@mssql_bind($cmd,"@p_tel",$v_user_tel,SQLVARCHAR);
	@mssql_bind($cmd,"@p_email",$v_user_email,SQLVARCHAR);
	@mssql_bind($cmd,"@p_username",$v_user_username,SQLVARCHAR);
	@mssql_bind($cmd,"@p_password",$v_user_password,SQLVARCHAR);
	$result = mssql_execute($cmd);
	$rs = @mssql_fetch_array($result);
	@mssql_free_result($result);
}
if(isset($rs['RET_ERROR'])){
	$v_error = _replace_bad_char(trim($rs['RET_ERROR']));
	if (!is_null($v_error) and $v_error<>""){?>
		<script>
			alert("<? echo $v_error; ?>");
			window.close();
		</script><?
		exit;
	}
}?>
<script>
	window.close();
</script>